//
//  CollectionHeaderView.m
//  UICollectionViewAdvance
//
//  Created by GuochengLiu on 2016/12/23.
//  Copyright © 2016年 sumavision. All rights reserved.
//

#import "CollectionHeaderView.h"

@implementation CollectionHeaderView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [self.expandButton setTitle:@"展开" forState:UIControlStateNormal];
    [self.expandButton setTitle:@"收起" forState:UIControlStateSelected];
}
- (IBAction)onHitExpandButton:(UIButton *)sender {
    [self.expandButton setSelected:!self.expandButton.selected];
    if ([self.delegate respondsToSelector:@selector(shouldExpand:headerView:)]) {
        [self.delegate shouldExpand:self.expandButton.selected headerView:self];
    }
}

@end
